<template>
	<view class="receipt" :style="{minHeight: pageHeight + 'px'}">
		<view class="addressList" v-for="item in 3">
			<view class="address-txt">
				<view class="address-name">
					<text style="vertical-align: middle;">阿伯次的</text>
					<text style="color: rgba(40, 44, 49, 0.6);vertical-align: middle;margin-left: 10px;margin-right: 15px;">177 **** 4567</text>
					<text class="tags">默认</text>
				</view>
				<view class="address-add">安徽省 合肥市 瑶海区 东一环与临淮路交口
铭座大厦1713(三里街)</view>
			</view>
			<view style="flex: 0 0 30px;text-align: center">
				<u--image src="../../../static/images/icon-right.svg" width="14px" height="14px" style="display: inline-block;vertical-align: middle;"></u--image>
			</view>
		</view>
		
		<view class="addAddress" @click="addAddress">
			<u--image src="../../../static/images/icon-add1.svg" width="14px" height="14px" style="display: inline-block;vertical-align: middle;"></u--image>
			
			<text style="vertical-align: middle;margin-left: 10px;">添加收货地址</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabIndex: 0,
				pageHeight: 0
			}
		},
		created() {
			this.$nextTick(() => {
				uni.getSystemInfo({
				  success: (res) => {  
					this.pageHeight = res.windowHeight
				  }  
				});
				
		
			})
		},
		methods: {
			addAddress() {
				uni.navigateTo({
					url: '/pages/components/mine/addAddress'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.receipt {
		background: #F7F8F9;
		padding-top: 2px;
		
		.addressList {
			width: 345px;
			padding: 15px;
			display: flex;
			align-items: center;
			background: #FFFFFF;
			border-radius: 10px;
			margin: 15px auto 0 auto;
			
			.address-txt {
				font-size: 14px;
				color: #EF312A;
				
				.address-name {
					margin-bottom: 5px;
					.tags {
						width: 30px;
						height: 16px;
						background: #FFFFFF;
						border-radius: 5px 5px 5px 5px;
						border: 1px solid #EF312A;
						display: inline-block;
						vertical-align: middle;
						font-size: 10px;
						color: #EF312A;
						text-align: center;
					}
				}
				.address-add {
					text-align: left;
					color: rgba(40, 44, 49, 0.6);
					font-size: 12px;
				}
			}
		}
	
		.addAddress {
			width: 345px;
			height: 50px;
			background: #EF312A;
			border-radius: 10px;
			margin: 15px auto;
			color: #fff;
			text-align: center;
			line-height: 50px;
			font-size: 14px;
		}
	}
</style>